package LeetCode;

public class LC96 {
    public static void main(String[] args) {

    }
    public int numTrees(int n) {
        return traceBack(0,n);
    }

    private int traceBack(int i, int n) {
        if(i>n){
            return 1;
        }
        for (int j = i; j <= n; j++) {
            return traceBack(i,j-1)+traceBack(j+1,n);
        }
        return 1;
    }

}
